package com.hoshiicloud.goods.feign.hystrix;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.goods.feign.IdGeneratorService;
import com.hoshiicloud.goods.feign.StoreFeignService;
import com.hoshiicloud.user.entity.store.PlatStore;
import com.hoshiicloud.user.param.PlatStoreQueryParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author zhangshuhu
 * @title: HystrixIdGeneratorFeignFallback
 * @projectName hoshiicloud-goods
 * @description:HystrixIdGeneratorFeignFallback
 * @since 2019-05-31
 */
public class StoreFeignFallback implements StoreFeignService {
    private Logger logger = LoggerFactory.getLogger(this.getClass());


    @Override
    public Response<Page<PlatStore>> getPlatStorePage(PlatStoreQueryParam param) {
        logger.error("hoshiicloud-goods服务Feign调用{}异常", "IdGeneratorService.queryGeneratorId");
        return null;
    }

    @Override
    public Response<PlatStore> queryById(Long id) {
        return Response.failed("获取店铺详情失败");
    }
}
